package com.opentutor.database;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Database {
	public static final String DB_NAME = "opentutor";
	public static final String USER_NAME = "sa";
	public static final String PASSWORD = "Install02";
	public static Connection connection = null;

	public static Connection getConnection() throws ClassNotFoundException,
			SQLException {
		if (connection == null) {
			
			Class.forName("com.mysql.jdbc.Driver");
			// Setup the connection with the DB
			connection = DriverManager.getConnection(
					"jdbc:mysql://localhost:3306/opentutor", "sa", "Install02");
		}
		return connection;
	}
}
